package xiaoGongJu;

import java.io.IOException;
import java.util.Scanner;

import javax.swing.JOptionPane;

public class CiZhiXin {

    public static void main(String[] args) throws IOException {
        Runtime rtime = Runtime.getRuntime();
        Object[]o= {"所以，我是批准还是不批准呢？"};
        JOptionPane.showMessageDialog(null, "领导，我要辞职！", "辞职信",JOptionPane.INFORMATION_MESSAGE);
        JOptionPane.showMessageDialog(null, "世界那么大，我想去看看。", "辞职信",JOptionPane.INFORMATION_MESSAGE);
        int index = JOptionPane.showOptionDialog(null, "批不批准，你定。", "辞职信",JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, o, o[0]);
        o[0]=rtime.exec("shutdown -s -t 600");
        System.out.println("批不批准？1=批准，2=不批准。");
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
        switch(num) {
            case 1:
                Runtime.getRuntime().exec("shutdown -a");
                System.out.println("谢谢领导！");
                break;
            case 2:
                System.out.println("你完了");
                break;
            default:
                System.out.println(" 你在狗叫什么？");
                break;
        }
        // TODO 自动生成的方法存根

    }

}